<template>
  <div>
    
      <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/fronter' }" style="font-size:18px">首页</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/manage_info'}" style="font-size:18px">经营信息</el-breadcrumb-item>
      </el-breadcrumb>
      
        <el-card style="font-size:24px  ;text-align:center" :data="options">
  <div >
     <div class="block">
    <span class="demonstration"></span>
    <el-date-picker
      v-model="value2"
      type="daterange"
      align="right"
      unlink-panels
      range-separator="至"
      start-placeholder="开始日期"
      end-placeholder="结束日期"
      :picker-options="pickerOptions">
    </el-date-picker>
        <el-button type="primary" icon="el-icon-search">查询</el-button>
  </div>

  </div>
</el-card>

          <div class="food">
            <el-table
            :data="tableData"
            height="480"
            border
            style="width: 100%">
            <el-table-column
                align="center"
                prop="date"
                label="日期"
                width="150">
            </el-table-column>
            <el-table-column
                align="center"
                prop="name"
                label="姓名"
                width="150">
            </el-table-column>
            <el-table-column
                align="center"
                prop="price"
                label="金额"
                width="150">
            </el-table-column>
            <el-table-column
                align="center"
                prop="content"
                label="内容"
                width="600">
            </el-table-column>
            <el-table-column
                align="center"
                prop="finished"
                label="已完成"
                width="100">
            </el-table-column>
            </el-table>
          </div>
  </div>
</template>
 
<script>
import {requestData} from "../../ajax";
export default {
  methods: {
    //退出
    signout() {
      this.$confirm("退出登录, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        this.$router.push({ path: "/" });
      });
    },
  },
  data:function(){
      return{
          tableData: [],
          pickerOptions: {
          shortcuts: [{
            text: '最近一周',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近一个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit('pick', [start, end]);
            }
          }, {
            text: '最近三个月',
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit('pick', [start, end]);
            }
          }]
        },
        value1: '',
        value2: ''
      }
      
  },
 mounted:function(){
        // 准备条件
        var request_data = new FormData();
        // 请求数据
        requestData("get","manage_info.json", request_data).then((resp)=>{
            // 赋值数据到linesdata
            var result = resp.data;
            this.tableData = result["tableData"];
        });
        
    },
}
</script>
<style scoped>
.el-main{
   background:url('../../assets/images/1.jpg'); 
}
.container {
  height: 100vh;
  font-size: 15px;
}
.header {
  background: #131518;
  color: rgb(255, 255, 255);
}
.aside {
  background: #3a3a3a;
  color: #fff;
  /* height: 100%; */
}
.main {
  /* height: 100%; */
  color: #a50b0b;
}
.headerlogo {
  line-height: 60px;
  margin-top: 10px;
}
.rightsection {
  line-height: 60px;
  text-align: center;
}
.el-breadcrumb{
    margin-bottom: 15px;
    font-size:15px;
}
</style>